#ifndef _HH_MATRIZ_HH_
#define _HH_MATRIZ_HH_

#include <iostream>
#include <vector>
class Resolver;

struct Coordenada
{
	double radio;
	double angulo;
};

class Matriz
{
  public:
    Matriz();
    Matriz(unsigned int fila, unsigned int columna);
    Matriz(const Matriz &matriz);
    Matriz(double **matrix, unsigned int filas, unsigned int columnas);
    ~Matriz();
    Matriz& operator=(Matriz &matriz);

    Matriz operator*(const Matriz &otra) const;
    Matriz operator+(const Matriz &otra) const;
    std::vector<double> operator*(const std::vector<double> &vec) const;

    std::vector<double> iesima_fila(unsigned int i) const;
    std::vector<double> iesima_columna(unsigned int i) const;
    double valor(unsigned int fila, unsigned int columna) const;
    
    void llenarMatriz();
    unsigned int cantFilas(){ return _filas; };
    unsigned int cantColumnas(){ return _columnas; };

    std::vector<double> resolver();
    int triangular();
    std::vector<Coordenada> calcularIsoterma(double delta_theta, double delta_radio, double radioB);
    double damePunto(int angulo, double delta_theta, double delta_radio, double radioB);

    friend std::ostream& operator<<(std::ostream &os, const Matriz &matriz);
    friend class Resolver;

  private:
    double **_matrix;
    unsigned int _filas, _columnas;

    void copiar_matriz(const Matriz &matriz);
    void borrar_matriz();
    
};

#endif//_HH_MATRIZ_HH_
